<template>
  <div class="lastest_list">
      <div>
        <h4>最新资源书籍 <a href="#" @click.prevent="sourceDownLoad">/更多</a></h4>
<!--        <ul class="manu_list">-->
<!--          <li v-for="(item,index) in titleList" :key="index" @click.prevent="change(item.id)"><a href="#">{{ item.name }}</a></li>-->
<!--        </ul>-->
        <ul class="manu_list_content">
          <li v-for="(item,i) in detailsList" :key="i" @click="upGood(item.id)">
            <Leatest1 :item="item"/>
          </li>
        </ul>
      </div>
  </div>
</template>

<script>
import Leatest1 from "@/views/home/leatest_list/Leatest1";
export default {
  name: "LatestDownload",
  data(){
    return{
      goodQuery:{
        pageSize:4
      },
      // titleList:[],
      index:0,
      detailsList:[],
    }
  },
  methods:{
    upGood(bookId){
      this.$router.push({path:'/purchasePage',query:{curBookId:bookId,dialogStatus:true}})
    },
    sourceDownLoad(){
      this.$router.push('/thingsdownload')
    }
    // change(cateId){
    //   this.goodQuery.cateId = cateId
    //   this.getRequest('/p/pms/book/list',this.goodQuery).then((resp)=>{
    //     this.detailsList = resp.data.list
    //   })
    // }
  },
  created() {
    // this.getRequest('/p/pms/bookCategory/list').then((resp)=>{
    //   console.log(resp)
    //   this.titleList = resp.data.list
    // }).then(()=>{
    //   this.goodQuery.cateId = 10000
    //   this.getRequest('/p/pms/book/list',this.goodQuery).then((resp)=>{
    //     this.detailsList = resp.data.list
    //   })
    // })
    this.getRequest('/p/pms/book/fileBookList',this.goodQuery).then((resp)=>{
      this.detailsList = resp.data.list
    })
  },
  components:{
    Leatest1
  }
}
</script>

<style>
*{margin: 0;padding: 0;list-style: none;}
.lastest_list{
  width: 420px;
  height: 490px;
  border: solid 1px lightgray;
  position: absolute;
  left: 45em;
}
.lastest_list .manu_list li{
  float: left;
  width: 50px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-right: solid 1px lightgray;
  margin: 2px 0;
}
.lastest_list h4{
  width: 100%;
  height: 29px;
  background: #f1f1f1;
  line-height: 29px;
  padding-left: 4px;
}
.manu_list_content{
  padding-left: 1em;
}
.manu_list_content li{
  float: left;
  width: 100%;
  border: solid 1px lightgoldenrodyellow;
  margin-bottom: 14px;
}
.manu_list_content li img{
  width: 100px;height: 100px;

}
.manu_list_content li div div{
  float: left;
  margin-right: 4.4em;
}
.manu_list_content li div div p:first-child{
  font-size: 20px;
}
</style>